package cn.lcsjsxy.yxc.reflect.Person;

@MyAnnotation
public class RichPerson extends Creature<String> implements Comparable<String>, MyInterface {
    private String name;
    int age;
    public int id;

    public RichPerson() {
    }

    @MyAnnotation(value = "this is 方法")
    private RichPerson(String name) {
        this.name = name;
    }

    RichPerson(int age, int id) {
        this.age = age;
        this.id = id;
    }

    @MyAnnotation(value = "wow")
    private String show(String nation){
        System.out.println("我的国籍是："+nation);
        return nation;
    }

    public String display(String interest) throws NullPointerException,ClassCastException{
        return interest;
    }

    @Override
    public void info() {
        System.out.println("我是一个人");
    }

    @Override
    public int compareTo(String o) {
        return 0;
    }

    public static void showDesc(){
        System.out.println("我是一个可爱的人");
    }

    @Override
    public String toString() {
        return "RichPerson{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", id=" + id +
                '}';
    }
}
